<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: sun
  Date: 2020/11/24
  Time: 14:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>留言</title>

</head>
<style>
    #div1{
        height: 80%;

    }
    #comment{
        width: 500px;
        height: 300px;
        position: absolute;
        left:500px;
        top:250px;

    }
    #ti{
        position: absolute;
        left: 940px;
        top:580px;
    }
    #liu{
        position: absolute;
        left: 500px;
        top:168px;}
    .red{
        position: absolute;
        left: 860px;
        top:555px;
    }


</style>
<script type="text/javascript">
    function setShowLength(obj, maxlength, id) {
        var rem = maxlength - obj.value.length;
        var wid = id;
        if (rem < 0){
            rem = 0;
        }
        document.getElementById(wid).innerHTML = "还可以输入" + rem + "字数";
    }
</script>
<body>
<jsp:include page="hade.jsp"/>
<div class="container">
    <form action="/remarks/getStuNum" method="post">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>姓名</th>
            <th>学号</th>
            <th>内容</th>
            <th>状态</th>
            <%--<th>操作</th>--%>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${reply}" var="student">
            <tr>
                <td>${student.stuName}</td>
                <td>${student.stuNum}</td>
                <%--<td>--%>
                    <%--<span class="badge badge-success">${student.deleteFlag eq 0?"正常":""}</span>--%>
                    <%--<span class="badge badge-danger">${student.deleteFlag eq 1?"已删":""}</span>--%>
                <%--</td>--%>
                <td>
                    <a href=""><button type="button" class="btn btn-danger">删除</button></a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    </form>
<form action="/remarks/stuAddRemarks" method="post">

    <div id="div1">
        <label for="comment" id="liu" ><h3>留言：</h3></label>
        <textarea  id="comment" name="rDis" maxlength="200" placeholder="留下你想说的" value="{$p.leaveCenter}" name="leaveCenter"onkeyup="javascript:setShowLength(this, 200, 'cost_tpl_title_length')"></textarea>
        <span class="red" id="cost_tpl_title_length">还可以输入200字数</span>
        <button type="submit" class="btn btn-primary" id="ti">提交</button>
    </div>
    <p>${msg}</p>
</form>
</div>
</body>
</html>
